package datapool.model
{
	/**
	 * @author Administrator
	 */
	public class ModelPool
	{
		private var _modelInfos:Array;
		
		public function ModelPool()
		{
			init();
		}
		
		private function init():void
		{
			_modelInfos = [];
		}
		
		public function getModelInfoById(id:uint):ModelInfo
		{
			var i:int;
			var modelInfo:ModelInfo;
			for(i=0; i<_modelInfos.length; i++)
			{
				modelInfo = _modelInfos[i] as ModelInfo;
				if(modelInfo)
				{
					if (modelInfo.id == id)
					{
						return modelInfo;
					}
				}
			}
			
			modelInfo = new ModelInfo;
			modelInfo.modelUrl = "world_role_1.swf";
			return modelInfo;
		}
	}
}
